public class Test {
    public static void main(String[] args) {
        BinaryTree binaryTree = new BinaryTree();
        BinaryTree.TreeNode root = binaryTree.createTree();

        System.out.print("前序遍历：");
        binaryTree.preOrder(root);
        System.out.println();

        System.out.print("中序遍历：");
        binaryTree.inOrder(root);
        System.out.println();

        System.out.print("后序遍历：");
        binaryTree.postOrder(root);
        System.out.println();

//        System.out.print("树的节点数：");
//        binaryTree.size(root);
//        System.out.println(BinaryTree.nodeSize);

        System.out.print("树的节点数：");
        int count1 = binaryTree.size2(root);
        System.out.println(count1);

//        System.out.print("树的叶子节点：");
//        binaryTree.getLeafNodeCount1(root);
//        System.out.println(BinaryTree.leafSize);

        System.out.print("树的叶子节点：");
        int count2 = binaryTree.getLeafNodeCount2(root);
        System.out.println(count2);

        System.out.print("第k层的节点个数:");
        int count3 = binaryTree.getKLevelNodeCount(root,3);
        System.out.println(count3);

        System.out.print("二叉树的高度：");
        int count4 = binaryTree.getHeight(root);
        System.out.println(count4);

        System.out.print("层序遍历：");
        binaryTree.levelOrder(root);
    }
}
